bitkeeper revision 1.1466.2.1 (428d01177uVxPlsgcWtGU3xUZaKeJw)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 19 May 2005 21:11:51 +0000 (21:11 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 19 May 2005 21:11:51 +0000 (21:11 +0000)
Rename memparse() to parse_size_and_unit(). A more general-purpose
name, and avoids unecessary clash with Linux function name.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/domain_build.c
xen/arch/x86/e820.c
xen/common/lib.c
xen/include/xen/lib.h

index 0bda826f7a886735010261ed80ea180a8eba3608..a8c66d628171f05f847db8c2b046b42acdf42ae1 100644 (file)
@@ -26,7 +26,7 @@
 static unsigned int opt_dom0_mem;
 static void parse_dom0_mem(char *s)
 {
-    unsigned long long bytes = memparse(s);
+    unsigned long long bytes = parse_size_and_unit(s);
     /* If no unit is specified we default to kB units, not bytes. */
     if ( isdigit(s[strlen(s)-1]) )
         opt_dom0_mem = (unsigned int)bytes;
index 9749a0eac90eb63824a4c4e424055c0841dca96b..aa41ac78daf533e0e724b3123d7154e52b51aecd 100644 (file)
@@ -5,7 +5,7 @@
 
 /* opt_mem: Limit of physical RAM. Any RAM beyond this point is ignored. */
 unsigned long long opt_mem;
-static void parse_mem(char *s) { opt_mem = memparse(s); }
+static void parse_mem(char *s) { opt_mem = parse_size_and_unit(s); }
 custom_param("mem", parse_mem);
 
 struct e820map e820;
index 6c0706f1f19debcf4755144ba9dd5241e667c29a..764ad7143d1eaf11e8c2efcbe7fa5f9c5b645d42 100644 (file)
@@ -441,7 +441,7 @@ s64 __moddi3(s64 a, s64 b)
 
 #endif /* BITS_PER_LONG == 32 */
 
-unsigned long long memparse(char *s)
+unsigned long long parse_size_and_unit(char *s)
 {
        unsigned long long ret = simple_strtoull(s, &s, 0);
 
index 56eae9d9b598527820144d65bac2c2f358a6676f..719e0f0d4fcde9e8b1cdaaaa14b56b035c71d0ec 100644 (file)
@@ -66,6 +66,6 @@ long long simple_strtoll(
 unsigned long long simple_strtoull(
     const char *cp,char **endp, unsigned int base);
 
-unsigned long long memparse(char *s);
+unsigned long long parse_size_and_unit(char *s);
 
 #endif /* __LIB_H__ */